package com.training.java.core.tdd;

import org.junit.Test;

import junit.framework.TestCase;



public class CalculatorTest {
   @Test  
	public void adding2And3ShouldGiveMe5(){
		
		Calculator calcu = new Calculator();
		
		int result = (int) calcu.add(2, 3);
		
		TestCase.assertEquals(5, result);
		
	}
   
   @Test
   public void adding11And9ShouldGiveMe20(){
	   
	   Calculator calcu = new Calculator();
	   
	   int result = (int) calcu.add(11, 9);
	   
	   TestCase.assertEquals(20, result);
   }
   @Test
   public void testAddForDecimalNumbers(){
	   
	   Calculator calcu = new Calculator();
	   
	   double result = calcu.add(5.6, 2.2);
	   
	   TestCase.assertEquals(7.8, result);
	   
   }
	
	
}
